@extends('admin_system/public/angular-layout')
<body ng-app="admin-app" ng-controller="memberController">
<div class="main-container">

    {{--顶部导航--}}
    <div class="col-xs-12 top-nav nav">
        <p class="float-left nav-path"><strong>当前位置：</strong>广告管理>>添加广告</p>

        {{--返回按钮--}}
        <button type="button" class="btn btn-default float-right back" aria-label="Left Align">
            <span class="glyphicon glyphicon-arrow-left back" aria-hidden="true"></span>
            <span>返回</span>
        </button>
    </div>

    <div class="h10 col-xs-12"></div>

    {{--中部导航--}}
    <ul class="nav nav-pills middle-nav">
        <li role="presentation" class="active"><a>导入用户</a></li>
        {{--<li role="presentation"><a href="#">Profile</a></li>--}}
        {{--<li role="presentation"><a href="#">Messages</a></li>--}}
    </ul>


    <table class="table table-bordered">

        <tr>
            <td class="ltd">上传文件</td>
            <td class="rtd">
                {{--,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 2010类型--}}
                <input type="file" id="excel" class="btn col-xs-3"  accept="application/msexcel,application/vnd.ms-excel">
                <input type="button" value="上传文件" class="btn  btn-primary" ng-click="upload_excel()">
                <a class="btn  btn-info" href="{{asset('upload-tmp/import-member.xls')}}" target="exceliframe">下载模板</a>
                <iframe src="" frameborder="0" class="hide" name="exceliframe"></iframe>
            </td>
        </tr>


        <tr>
            <td class="ltd">公司名称</td>
            <td class="rtd">
                <input id="txtYourName" class="input-text"   ng-model="companyName" ng-blur="check_company_exists()"/>
                <span class="text-red pl10">*必填</span>
            </td>
        </tr>
    </table>


    <div style="max-height:70vh;overflow: scroll;" ng-if="importedUsers.length">
        <table class="table table-striped">
            <tr>
                <th>姓名</th>
                <th>手机号</th>
                <th>部门</th>
                <th>职务</th>
                <th>操作</th>
            </tr>


            <tr ng-repeat="u in importedUsers" ng-class="u.repeat == 1 ? 'info' : ''">
                <td>@{{u.username}}</td>
                <td>@{{u.mobile}}</td>
                <td>@{{u.department}}</td>
                <td>@{{u.job}}</td>
                <td><button class="btn btn-xs btn-danger" ng-click="delete_single_member(u)">删除</button></td>
            </tr>
        </table>
    </div>


    <div class="h30"></div>
    <div class="text-center">
        <button class="btn btn-danger" disabled ng-if="importedUsers.length == 0">提交数据</button>
        <button class="btn btn-danger" ng-if="importedUsers.length > 0" ng-click="add_members()">提交数据</button>
    </div>
</div>
</body>